//
//  Student.m
//  05- 循环遍历
//
//  Created by mafeng on 16/7/8.
//  Copyright © 2016年 mafeng. All rights reserved.
//

#import "Student.h"

@implementation Student
- (NSString *)description
{
    return [NSString stringWithFormat:@"当前人的年龄:%ld", _age];
}
- (NSComparisonResult)compareByAge:(Student *)anotherPerson {
    return self.age > anotherPerson.age;
}
- (NSComparisonResult)compareByName:(Student *)anotherPerson {
    return [self.name compare:anotherPerson.name];
}
@end
